<template>
    <div>
        <div id="47ce7b74b235419fb1e1bda7ee4d527f" style="width:100%;height:100%;"></div>
    </div>
</template>

<script>
    import {get_film_map_charts} from "../../../api";

    export default {
        name: "movieMap",
        methods:{
            myEcharts(){

                var myChart_47ce7b74b235419fb1e1bda7ee4d527f = this.$echarts.init(document.getElementById('47ce7b74b235419fb1e1bda7ee4d527f'), 'light', {renderer: 'canvas'});

                var option_47ce7b74b235419fb1e1bda7ee4d527f = {
                    "title": [
                        {
                            // "text": "\u4e0a\u699c\u7535\u5f71\u5404\u56fd\u6570\u91cf\u5730\u56fe",
                            "left": "center",
                            "top": "bottom",
                            "textStyle": {
                                "fontSize": 18
                            },
                            "subtextStyle": {
                                "fontSize": 12
                            }
                        }
                    ],
                    "toolbox": {
                        "show": true,
                        "orient": "vertical",
                        "left": "95%",
                        "top": "center",
                        "feature": {
                            "saveAsImage": {
                                "show": true,
                                "title": "save as image"
                            },
                            "restore": {
                                "show": true,
                                "title": "restore"
                            },
                            "dataView": {
                                "show": true,
                                "title": "data view"
                            },
                            "magicType": {
                                "show": true,
                                "type": [
                                    "line",
                                    "bar",
                                    "stack",
                                    "tiled"
                                ],
                                "title": {
                                    "line": "\u6298\u7ebf\u56fe",
                                    "bar": "\u67f1\u72b6\u56fe",
                                    "stack": "\u5806\u53e0",
                                    "tiled": "\u5e73\u94fa"
                                }
                            },
                            "dataZoom": {
                                "show": true,
                                "title": {
                                    "zoom": "\u533a\u57df\u7f29\u653e",
                                    "back": "\u7f29\u653e\u8fd8\u539f"
                                }
                            }
                        }
                    },
                    "series_id": 2116109,
                    "tooltip": {
                        "trigger": "item",
                        "triggerOn": "mousemove|click",
                        "axisPointer": {
                            "type": "line"
                        },
                        "textStyle": {
                            "fontSize": 14
                        },
                        "backgroundColor": "rgba(255,255,255,0.7)",
                        "borderColor": "#4175a4",
                        "borderWidth": 0
                    },
                    "series": [
                        {
                            "type": "map",
                            "name": "\u56fd\u5bb6/\u5730\u533a",
                            "symbol": "circle",
                            "label": {
                                "normal": {
                                    "show": false,
                                    "position": "top",
                                    "textStyle": {
                                        "fontSize": 12
                                    }
                                },
                                "emphasis": {
                                    "show": true,
                                    "textStyle": {
                                        "fontSize": 12
                                    }
                                }
                            },
                            "mapType": "world",
                            "data": [],
                            "roam": true,
                            "showLegendSymbol": false,
                            "nameMap": {
                                "Singapore Rep.": "\u65b0\u52a0\u5761",
                                "Dominican Rep.": "\u591a\u7c73\u5c3c\u52a0",
                                "Palestine": "\u5df4\u52d2\u65af\u5766",
                                "Bahamas": "\u5df4\u54c8\u9a6c",
                                "Timor-Leste": "\u4e1c\u5e1d\u6c76",
                                "Afghanistan": "\u963f\u5bcc\u6c57",
                                "Guinea-Bissau": "\u51e0\u5185\u4e9a\u6bd4\u7ecd",
                                "C\u00f4te d'Ivoire": "\u79d1\u7279\u8fea\u74e6",
                                "Siachen Glacier": "\u9521\u4e9a\u7434\u51b0\u5ddd",
                                "Br. Indian Ocean Ter.": "\u82f1\u5c5e\u5370\u5ea6\u6d0b\u9886\u571f",
                                "Angola": "\u5b89\u54e5\u62c9",
                                "Albania": "\u963f\u5c14\u5df4\u5c3c\u4e9a",
                                "United Arab Emirates": "\u963f\u8054\u914b",
                                "Argentina": "\u963f\u6839\u5ef7",
                                "Armenia": "\u4e9a\u7f8e\u5c3c\u4e9a",
                                "French Southern and Antarctic Lands": "\u6cd5\u5c5e\u5357\u534a\u7403\u548c\u5357\u6781\u9886\u5730",
                                "Australia": "\u6fb3\u5927\u5229\u4e9a",
                                "Austria": "\u5965\u5730\u5229",
                                "Azerbaijan": "\u963f\u585e\u62dc\u7586",
                                "Burundi": "\u5e03\u9686\u8fea",
                                "Belgium": "\u6bd4\u5229\u65f6",
                                "Benin": "\u8d1d\u5b81",
                                "Burkina Faso": "\u5e03\u57fa\u7eb3\u6cd5\u7d22",
                                "Bangladesh": "\u5b5f\u52a0\u62c9\u56fd",
                                "Bulgaria": "\u4fdd\u52a0\u5229\u4e9a",
                                "The Bahamas": "\u5df4\u54c8\u9a6c",
                                "Bosnia and Herz.": "\u6ce2\u65af\u5c3c\u4e9a\u548c\u9ed1\u585e\u54e5\u7ef4\u90a3",
                                "Belarus": "\u767d\u4fc4\u7f57\u65af",
                                "Belize": "\u4f2f\u5229\u5179",
                                "Bermuda": "\u767e\u6155\u5927",
                                "Bolivia": "\u73bb\u5229\u7ef4\u4e9a",
                                "Brazil": "\u5df4\u897f",
                                "Brunei": "\u6587\u83b1",
                                "Bhutan": "\u4e0d\u4e39",
                                "Botswana": "\u535a\u8328\u74e6\u7eb3",
                                "Central African Rep.": "\u4e2d\u975e",
                                "Canada": "\u52a0\u62ff\u5927",
                                "Switzerland": "\u745e\u58eb",
                                "Chile": "\u667a\u5229",
                                "China": "\u4e2d\u56fd",
                                "Ivory Coast": "\u8c61\u7259\u6d77\u5cb8",
                                "Cameroon": "\u5580\u9ea6\u9686",
                                "Dem. Rep. Congo": "\u521a\u679c\u6c11\u4e3b\u5171\u548c\u56fd",
                                "Congo": "\u521a\u679c",
                                "Colombia": "\u54e5\u4f26\u6bd4\u4e9a",
                                "Costa Rica": "\u54e5\u65af\u8fbe\u9ece\u52a0",
                                "Cuba": "\u53e4\u5df4",
                                "N. Cyprus": "\u5317\u585e\u6d66\u8def\u65af",
                                "Cyprus": "\u585e\u6d66\u8def\u65af",
                                "Czech Rep.": "\u6377\u514b",
                                "Germany": "\u5fb7\u56fd",
                                "Djibouti": "\u5409\u5e03\u63d0",
                                "Denmark": "\u4e39\u9ea6",
                                "Algeria": "\u963f\u5c14\u53ca\u5229\u4e9a",
                                "Ecuador": "\u5384\u74dc\u591a\u5c14",
                                "Egypt": "\u57c3\u53ca",
                                "Eritrea": "\u5384\u7acb\u7279\u91cc\u4e9a",
                                "Spain": "\u897f\u73ed\u7259",
                                "Estonia": "\u7231\u6c99\u5c3c\u4e9a",
                                "Ethiopia": "\u57c3\u585e\u4fc4\u6bd4\u4e9a",
                                "Finland": "\u82ac\u5170",
                                "Fiji": "\u6590",
                                "Falkland Islands": "\u798f\u514b\u5170\u7fa4\u5c9b",
                                "France": "\u6cd5\u56fd",
                                "Gabon": "\u52a0\u84ec",
                                "United Kingdom": "\u82f1\u56fd",
                                "Georgia": "\u683c\u9c81\u5409\u4e9a",
                                "Ghana": "\u52a0\u7eb3",
                                "Guinea": "\u51e0\u5185\u4e9a",
                                "Gambia": "\u5188\u6bd4\u4e9a",
                                "Guinea Bissau": "\u51e0\u5185\u4e9a\u6bd4\u7ecd",
                                "Eq. Guinea": "\u8d64\u9053\u51e0\u5185\u4e9a",
                                "Greece": "\u5e0c\u814a",
                                "Greenland": "\u683c\u9675\u5170",
                                "Guatemala": "\u5371\u5730\u9a6c\u62c9",
                                "French Guiana": "\u6cd5\u5c5e\u572d\u4e9a\u90a3",
                                "Guyana": "\u572d\u4e9a\u90a3",
                                "Honduras": "\u6d2a\u90fd\u62c9\u65af",
                                "Croatia": "\u514b\u7f57\u5730\u4e9a",
                                "Haiti": "\u6d77\u5730",
                                "Hungary": "\u5308\u7259\u5229",
                                "Indonesia": "\u5370\u5ea6\u5c3c\u897f\u4e9a",
                                "India": "\u5370\u5ea6",
                                "Ireland": "\u7231\u5c14\u5170",
                                "Iran": "\u4f0a\u6717",
                                "Iraq": "\u4f0a\u62c9\u514b",
                                "Iceland": "\u51b0\u5c9b",
                                "Israel": "\u4ee5\u8272\u5217",
                                "Italy": "\u610f\u5927\u5229",
                                "Jamaica": "\u7259\u4e70\u52a0",
                                "Jordan": "\u7ea6\u65e6",
                                "Japan": "\u65e5\u672c",
                                "Kazakhstan": "\u54c8\u8428\u514b\u65af\u5766",
                                "Kenya": "\u80af\u5c3c\u4e9a",
                                "Kyrgyzstan": "\u5409\u5c14\u5409\u65af\u65af\u5766",
                                "Cambodia": "\u67ec\u57d4\u5be8",
                                "Korea": "\u97e9\u56fd",
                                "Kosovo": "\u79d1\u7d22\u6c83",
                                "Kuwait": "\u79d1\u5a01\u7279",
                                "Lao PDR": "\u8001\u631d",
                                "Lebanon": "\u9ece\u5df4\u5ae9",
                                "Liberia": "\u5229\u6bd4\u91cc\u4e9a",
                                "Libya": "\u5229\u6bd4\u4e9a",
                                "Sri Lanka": "\u65af\u91cc\u5170\u5361",
                                "Lesotho": "\u83b1\u7d22\u6258",
                                "Lithuania": "\u7acb\u9676\u5b9b",
                                "Luxembourg": "\u5362\u68ee\u5821",
                                "Latvia": "\u62c9\u8131\u7ef4\u4e9a",
                                "Morocco": "\u6469\u6d1b\u54e5",
                                "Moldova": "\u6469\u5c14\u591a\u74e6",
                                "Madagascar": "\u9a6c\u8fbe\u52a0\u65af\u52a0",
                                "Mexico": "\u58a8\u897f\u54e5",
                                "Macedonia": "\u9a6c\u5176\u987f",
                                "Mali": "\u9a6c\u91cc",
                                "Myanmar": "\u7f05\u7538",
                                "Montenegro": "\u9ed1\u5c71",
                                "Mongolia": "\u8499\u53e4",
                                "Mozambique": "\u83ab\u6851\u6bd4\u514b",
                                "Mauritania": "\u6bdb\u91cc\u5854\u5c3c\u4e9a",
                                "Malawi": "\u9a6c\u62c9\u7ef4",
                                "Malaysia": "\u9a6c\u6765\u897f\u4e9a",
                                "Namibia": "\u7eb3\u7c73\u6bd4\u4e9a",
                                "New Caledonia": "\u65b0\u5580\u91cc\u591a\u5c3c\u4e9a",
                                "Niger": "\u5c3c\u65e5\u5c14",
                                "Nigeria": "\u5c3c\u65e5\u5229\u4e9a",
                                "Nicaragua": "\u5c3c\u52a0\u62c9\u74dc",
                                "Netherlands": "\u8377\u5170",
                                "Norway": "\u632a\u5a01",
                                "Nepal": "\u5c3c\u6cca\u5c14",
                                "New Zealand": "\u65b0\u897f\u5170",
                                "Oman": "\u963f\u66fc",
                                "Pakistan": "\u5df4\u57fa\u65af\u5766",
                                "Panama": "\u5df4\u62ff\u9a6c",
                                "Peru": "\u79d8\u9c81",
                                "Philippines": "\u83f2\u5f8b\u5bbe",
                                "Papua New Guinea": "\u5df4\u5e03\u4e9a\u65b0\u51e0\u5185\u4e9a",
                                "Poland": "\u6ce2\u5170",
                                "Puerto Rico": "\u6ce2\u591a\u9ece\u5404",
                                "Dem. Rep. Korea": "\u671d\u9c9c",
                                "Portugal": "\u8461\u8404\u7259",
                                "Paraguay": "\u5df4\u62c9\u572d",
                                "Qatar": "\u5361\u5854\u5c14",
                                "Romania": "\u7f57\u9a6c\u5c3c\u4e9a",
                                "Russia": "\u4fc4\u7f57\u65af",
                                "Rwanda": "\u5362\u65fa\u8fbe",
                                "W. Sahara": "\u897f\u6492\u54c8\u62c9",
                                "Saudi Arabia": "\u6c99\u7279\u963f\u62c9\u4f2f",
                                "Sudan": "\u82cf\u4e39",
                                "S. Sudan": "\u5357\u82cf\u4e39",
                                "Senegal": "\u585e\u5185\u52a0\u5c14",
                                "Solomon Is.": "\u6240\u7f57\u95e8\u7fa4\u5c9b",
                                "Sierra Leone": "\u585e\u62c9\u5229\u6602",
                                "El Salvador": "\u8428\u5c14\u74e6\u591a",
                                "Somaliland": "\u7d22\u9a6c\u91cc\u5170",
                                "Somalia": "\u7d22\u9a6c\u91cc",
                                "Serbia": "\u585e\u5c14\u7ef4\u4e9a",
                                "Suriname": "\u82cf\u91cc\u5357",
                                "Slovakia": "\u65af\u6d1b\u4f10\u514b",
                                "Slovenia": "\u65af\u6d1b\u6587\u5c3c\u4e9a",
                                "Sweden": "\u745e\u5178",
                                "Swaziland": "\u65af\u5a01\u58eb\u5170",
                                "Syria": "\u53d9\u5229\u4e9a",
                                "Chad": "\u4e4d\u5f97",
                                "Togo": "\u591a\u54e5",
                                "Thailand": "\u6cf0\u56fd",
                                "Tajikistan": "\u5854\u5409\u514b\u65af\u5766",
                                "Turkmenistan": "\u571f\u5e93\u66fc\u65af\u5766",
                                "East Timor": "\u4e1c\u5e1d\u6c76",
                                "Trinidad and Tobago": "\u7279\u91cc\u5c3c\u8fbe\u548c\u591a\u5df4\u54e5",
                                "Tunisia": "\u7a81\u5c3c\u65af",
                                "Turkey": "\u571f\u8033\u5176",
                                "Tanzania": "\u5766\u6851\u5c3c\u4e9a",
                                "Uganda": "\u4e4c\u5e72\u8fbe",
                                "Ukraine": "\u4e4c\u514b\u5170",
                                "Uruguay": "\u4e4c\u62c9\u572d",
                                "United States": "\u7f8e\u56fd",
                                "Uzbekistan": "\u4e4c\u5179\u522b\u514b\u65af\u5766",
                                "Venezuela": "\u59d4\u5185\u745e\u62c9",
                                "Vietnam": "\u8d8a\u5357",
                                "Vanuatu": "\u74e6\u52aa\u963f\u56fe",
                                "West Bank": "\u897f\u5cb8",
                                "Yemen": "\u4e5f\u95e8",
                                "South Africa": "\u5357\u975e",
                                "Zambia": "\u8d5e\u6bd4\u4e9a",
                                "Zimbabwe": "\u6d25\u5df4\u5e03\u97e6",
                                "Comoros": "\u79d1\u6469\u7f57"
                            }
                        }
                    ],
                    "legend": [
                        {
                            "data": [
                                "\u56fd\u5bb6/\u5730\u533a"
                            ],
                            "selectedMode": "multiple",
                            "show": true,
                            "left": "center",
                            "top": "top",
                            "orient": "horizontal",
                            "textStyle": {
                                "fontSize": 12
                            }
                        }
                    ],
                    "animation": true,
                    "color": [
                        "#c23531",
                        "#2f4554",
                        "#61a0a8",
                        "#d48265",
                        "#749f83",
                        "#ca8622",
                        "#bda29a",
                        "#6e7074",
                        "#546570",
                        "#c4ccd3",
                        "#f05b72",
                        "#ef5b9c",
                        "#f47920",
                        "#905a3d",
                        "#fab27b",
                        "#2a5caa",
                        "#444693",
                        "#726930",
                        "#b2d235",
                        "#6d8346",
                        "#ac6767",
                        "#1d953f",
                        "#6950a1",
                        "#918597",
                        "#f6f5ec"
                    ],
                    "visualMap": {
                        "type": "continuous",
                        "min": 0,
                        "max": 100,
                        "text": [
                            "high",
                            "low"
                        ],
                        "textStyle": {},
                        "inRange": {
                            "color": [
                                "#50a3ba",
                                "#eac763",
                                "#d94e5d"
                            ]
                        },
                        "calculable": true,
                        "splitNumber": 5,
                        "orient": "vertical",
                        "left": "left",
                        "top": "bottom",
                        "showLabel": true
                    }
                };
                myChart_47ce7b74b235419fb1e1bda7ee4d527f.setOption(option_47ce7b74b235419fb1e1bda7ee4d527f);
                get_film_map_charts().then(res =>{
                    myChart_47ce7b74b235419fb1e1bda7ee4d527f.hideLoading();
                    myChart_47ce7b74b235419fb1e1bda7ee4d527f.setOption({
                        series: [{
                            data: res.data  //将异步请求获取到的数据进行装载
                        }]
                    })

                })

            }
        },
        mounted() {
            this.myEcharts()
        }
    }
</script>

<style scoped>

</style>